﻿#include <iostream>
using namespace std;

int max(int a, int b, int c) {
	int max = a;
	if (b > max) max = b;
	if (c > max) max = c;
	return max;
}

int main() {
	int math[3];
	int eng[3];

	// 读入分数
	for (int i = 0; i < 3; i++) {
		cout << "数学："; cin >> math[i];
		cout << "英语："; cin >> eng[i];
	}

	cout << "数学最高分为：" << max(math[0], math[1], math[2]) << endl;
	cout << "英语最高分为：" << max(eng[0], eng[1], eng[2]) << endl;

	cin.get();
	cin.get();
}